

function projectStateType (row) {
  const item = row.projectState
  if (item === '00026_0') {
    return '倒计时'
  }
  else if (item === '00026_1') {
    return '正在询价'
  }
  else if (item === '00026_2') {
    return '询价结束'
  }
  else if (item === '00026_3') {
    return '废标'
  } else if (item === '00026_4') {
    return '项目撤销采购'
  } else if (item === '00026_5') {
    return '询价失败'
  } else {
    return ''
  }
}

function picketageStateType (row) {
  const item = row.picketageState
  if (item === '00029_0') {
    return '采购人未定标'
  }
  else if (item === '00029_1') {
    return '采购人定标'
  }
  else if (item === '00029_2') {
    return '中心审核通过'
  }
  else if (item === '00029_3') {
    return '中心审核不通过'
  }
  else if (item === '00029_4') {
    return '采购人不确认'
  } else if (item === '00029_5') {
    return '已建立合同'
  } else {
    return '已建立合同'
  }
}

export const columns = [
  {
    prop: 'projectNo',
    minWidth: '150',
    label: '项目编号'
  },
  {
    prop: 'projectName',
    minWidth: '140',
    label: '项目名称',
    'show-overflow-tooltip': true
    // slotName: 'projectName'
  },
  {
    prop: 'bidMinNumber',
    minWidth: '200',
    label: '参加供应商最低家数'
  },
  {
    prop: 'bidNumber',
    minWidth: '150',
    label: '报价次数控制'
  },
  {
    prop: 'projectState',
    minWidth: '110',
    label: '项目状态',
    formatter: projectStateType
  },
  {
    prop: 'picketageState',
    minWidth: '110',
    label: '定标状态',
    formatter: picketageStateType
  },
  {
    prop: 'startTime',
    minWidth: '200',
    label: '询价开始时间'
  },
  {
    prop: 'endTime',
    minWidth: '200',
    label: '询价结束时间'
  },
  {
    fixed: 'right',
    minWidth: '200',
    label: '操作',
    slotName: 'operation'
  }
]

export const columns1 = [
  {
    prop: 'goodsName',
    minWidth: '150',
    label: '商品名称'
  },
  {
    prop: 'brandName',
    minWidth: '150',
    label: '品牌'
  },
  {
    prop: 'unit',
    minWidth: '150',
    label: '规格型号'
  },
  {
    prop: 'price',
    minWidth: '150',
    label: '预算单价'
  },
  {
    prop: 'includedTax',
    minWidth: '150',
    label: '是否含税'
  },
  {
    prop: 'buyNum',
    minWidth: '150',
    label: '数量'
  },
  {
    prop: 'budget',
    minWidth: '150',
    label: '总价'
  },
  {
    prop: 'unit',
    minWidth: '150',
    label: '计量单位'
  },
  {
    prop: 'demandDocument',
    minWidth: '150',
    label: '需求附件'
  },
  {
    prop: 'remark',
    minWidth: '150',
    label: '备注',
    slotName: 'remark'
  }
]

export const columns2 = [
  {
    prop: 'firstCodeName',
    minWidth: '150',
    label: '节点名称'
  },
  {
    prop: 'createTime',
    minWidth: '150',
    label: '处理时间'
  },
  {
    prop: 'personName',
    minWidth: '150',
    label: '处理人'
  },
  {
    prop: 'remark',
    width: '140',
    label: '说明',
    slotName: 'remark'
  }
]

export const columns3 = [
  {
    prop: 'suppChinaName',
    minWidth: '150',
    label: '供应商名称'
  },
  {
    prop: 'biddingLinkman',
    minWidth: '150',
    label: '联系人'
  },
  {
    prop: 'biddingLinkmanMobile',
    minWidth: '150',
    label: '联系人手机'
  },
  {
    prop: 'biddingCount',
    minWidth: '150',
    label: '已报价次数'
  },
  {
    prop: 'sumPrice',
    minWidth: '150',
    label: '总报价（元）'
  },
  {
    prop: 'editSumPrice',
    minWidth: '150',
    label: '最終定标价格',
    slotName: 'editSumPrice'
  },
  {
    prop: 'biddingStateName',
    minWidth: '150',
    label: '询价状态'
  },
  {
    prop: 'stateName',
    minWidth: '150',
    label: '定标状态'
  }
]

export const columns4 = [
  {
    prop: 'projectNo',
    minWidth: '150',
    label: '项目编号'
  },
  {
    prop: 'projectName',
    minWidth: '150',
    label: '项目名称'
  },
  {
    prop: 'projectState',
    minWidth: '150',
    label: '项目状态',
    formatter: projectStateType
  },
  {
    prop: 'picketageState',
    minWidth: '150',
    label: '定标状态',
    formatter: picketageStateType
  },
  {
    prop: 'startTime',
    minWidth: '150',
    label: '询价开始时间'
  },
  {
    prop: 'endTime',
    minWidth: '150',
    label: '询价结束时间'
  }
]

export const columns5 = [
  {
    prop: 'suppChinaName',
    minWidth: '150',
    label: '供应商名称'
  },
  {
    prop: 'sumPrice',
    minWidth: '150',
    label: '项目金额'
  },
  {
    prop: 'pledgePrice',
    minWidth: '150',
    label: '保证金金额'
  },
  {
    prop: 'uploadStatusName',
    minWidth: '150',
    label: '保证金状态'
  },
  {
    prop: 'auditStatusName',
    minWidth: '150',
    label: '审核状态'
  },
  {
    fixed: 'right',
    minWidth: '200',
    label: '操作',
    slotName: 'certificateOperation'
  }
]

export const columns6 = [
  {
    prop: 'suppChinaName',
    minWidth: '150',
    label: '供应商名称'
  },
  {
    prop: 'sumPriceStr',
    minWidth: '150',
    label: '项目金额'
  },
  {
    prop: 'pledgePrice',
    minWidth: '150',
    label: '保证金金额'
  },
  {
    prop: 'auditStatusName',
    minWidth: '150',
    label: '保证金状态'
  },
  {
    prop: 'auditOpinion',
    width: '140',
    label: '审核原因',
    slotName:'auditOpinion'
  }
]
